﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) CompanyName.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.Twitter
{
	#region Using Statements
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;

	using MbUnit.Framework;

	using Describe = MbUnit.Framework.TestsOnAttribute;
	using InContext = MbUnit.Framework.DescriptionAttribute;
	using It = MbUnit.Framework.TestAttribute;
	using Should = MbUnit.Framework.DescriptionAttribute;
	using By = MbUnit.Framework.AuthorAttribute;
	using Tag = MbUnit.Framework.CategoryAttribute;
	#endregion

	[
		Describe(typeof(NotificationClient)),
		InContext("should perform its specified behavor."),
		Tag("Functional"),
		Ignore,
		By("Michael Herndon", "mherndon@opensourceconnections.com", "www.amptools.net")
	]
	public class NotificationClientSpec : Spec
	{

		[It, Should(" create and destroy a notification. ")]
		public void CreateAndDestroyANotification()
		{
			User[] users = Twitter.CreateUserClient().GetFriends();
			users.ShouldNotBeNull();
			users.Length.ShouldBeGreaterThan(0);
			if (users.Length == 0)
				Assert.Fail("count should have been greater than 0");

			NotificationClient client = Twitter.CreateNotificationClient();
			User user = client.Destroy(users[0].Screename);
			user.ShouldNotBeNull();
			user.Screename.ShouldBe(users[0].Screename);
				
				
			user = client.Create(user.Screename);
			user.ShouldNotBeNull();
			user.Screename.ShouldBe(users[0].Screename);


		}
	}
}
